<?php
/**
 * Created by PhpStorm.
 * User: yadongw
 * Date: 15-5-26
 * Time: 下午7:46
 */
use UcxApiSdk\Client;
include 'common.php';

$client = new Client();
$client->setAccessToken($_COOKIE['ucx_access_token']);
$documentResource = $client->getDocument();
$doc_id = $_GET['did'];
$document = $documentResource->find($doc_id);
$webLink = $documentResource->webLink($doc_id);
?>

<h2>Web Link Url</h2>
<p><?= $webLink['share_url'] ?></p>

<h2>Bar Code</h2>
<img src="<?= $webLink['barcode_url'] ?>" />
<br />
<a class="btn btn-default" href="share.php?action=delete&sid=<?= $webLink['share_id'] ?>">Deactivate Web Link</a>